package com.example.douyin.chat;

import android.view.View;

import com.alibaba.android.arouter.launcher.ARouter;
import com.blankj.utilcode.util.ToastUtils;
import com.example.douyin.R;
import com.hyphenate.easeui.modules.chat.EaseChatFragment;
import com.hyphenate.easeui.modules.chat.interfaces.IChatExtendMenu;


public class MyEaseChatFragment extends EaseChatFragment {
    @Override
    public void initView() {
        super.initView();
        IChatExtendMenu extendMenu = chatLayout.getChatInputMenu().getChatExtendMenu();
        extendMenu.registerMenuItem("红包", R.drawable.hongbao,300);
    }

    @Override
    public void onChatExtendMenuItemClick(View view, int itemId) {
        super.onChatExtendMenuItemClick(view, itemId);
        if(itemId==300){
            //ToastUtils.showLong("点击了发送包按钮");
            //接入支付宝
            String id = getArguments().getString("conversationId");
            ARouter.getInstance().build("/app/PayActivity").withString("id",id).navigation();
        }
    }
}
